import scrapy


class BaiduSpider(scrapy.Spider):
    # 爬虫的名称
    name = 'baidu'
    # 允许访问的域名
    allowed_domains = ['www.baidu.com']
    # 起始的url地址  是第一次要访问的地址
    start_urls = ['http://www.baidu.com/']

    # 相当于response = urllib.request.urlopen()
    #        response = requests.get()
    def parse(self, response):
        print('hello baidu')
        pass
